package com.jwgf.faultnavigation;

import com.jwgf.adapter.ItemViewDelegate;
import com.jwgf.adapter.RecyclerViewHolder;
import com.jwgf.smarowindingmachine_unity.R;

public class FaultNavigationTitleDelegate implements ItemViewDelegate {
    @Override
    public int getItemViewLayoutId() {
        return R.layout.fault_navigation_title;
    }

    @Override
    public boolean isForViewType(Object item, int position) {
        return item instanceof FaultNavigationTitle;
    }

    @Override
    public void bindView(RecyclerViewHolder holder, Object o, int position) {
        final FaultNavigationTitle title = (FaultNavigationTitle) o;
        holder.setText(R.id.title, title.title);
        holder.setText(R.id.attention, title.attention);
    }
}
